﻿import 'package:get/get.dart';
import 'exercise_view.dart';
import 'exercise_logic.dart';
import 'gps_permission_view.dart';
// import 'gps_permission_logic.dart';
import 'exercise_recording/exercise_recording_view.dart';
import 'exercise_recording/exercise_recording_logic.dart';
import 'goal_setting/goal_setting_view.dart';
import 'goal_setting/goal_setting_logic.dart';
import 'non_gps_goal_setting/non_gps_goal_setting_view.dart';
import 'non_gps_goal_setting/non_gps_goal_setting_logic.dart';
import 'non_gps_exercise_recording/non_gps_exercise_recording_view.dart';
import 'non_gps_exercise_recording/non_gps_exercise_recording_logic.dart';
import 'count_down/countdown_view.dart';
import 'count_down/countdown_logic.dart';
import 'exercise_record/exercise_record_view.dart';
import 'exercise_record/exercise_record_logic.dart';
import 'exercise_record/exercise_record_detail_view.dart';
import 'exercise_record/exercise_record_detail_logic.dart';

/// 锻炼模块路由配置
class ExerciseRoutes {
  /// 锻炼选择主页
  static const String exercise = '/exercise';
  
  /// GPS权限提示页
  static const String gpsPermission = '/exercise/gps-permission';
  
  /// GPS运动记录页
  static const String exerciseRecording = '/exercise/recording';
  
  /// 目标设置页
  static const String goalSetting = '/exercise/goal-setting';
  
  /// 非GPS运动目标设置页
  static const String nonGpsGoalSetting = '/exercise/non-gps-goal-setting';
  
  /// 非GPS运动记录页
  static const String nonGpsExerciseRecording = '/exercise/non-gps-recording';
  
  /// 运动倒计时页
  static const String countdown = '/exercise/countdown';
  
  /// 运动记录页
  static const String exerciseRecord = '/exercise/record';
  
  /// 运动记录详情页
  static const String exerciseRecordDetail = '/exercise/record/detail';

  static final List<GetPage> routes = [
    GetPage(
      name: exercise,
      page: () => const ExerciseView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => ExerciseLogic());
      }),
    ),
    GetPage(
      name: gpsPermission,
      page: () => const GpsPermissionView(),
      // binding: BindingsBuilder(() {
      //   Get.lazyPut(() => GpsPermissionLogic());
      // }),
    ),
    GetPage(
      name: exerciseRecording,
      page: () => const ExerciseRecordingView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => ExerciseRecordingLogic());
      }),
    ),
    GetPage(
      name: goalSetting,
      page: () => const GoalSettingView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => GoalSettingLogic());
      }),
    ),
    GetPage(
      name: nonGpsGoalSetting,
      page: () => const NonGpsGoalSettingView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => NonGpsGoalSettingLogic());
      }),
    ),
    GetPage(
      name: nonGpsExerciseRecording,
      page: () => const NonGpsExerciseRecordingView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => NonGpsExerciseRecordingLogic());
      }),
    ),
    GetPage(
      name: countdown,
      page: () => const CountdownView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => CountdownLogic());
      }),
    ),
    GetPage(
      name: exerciseRecord,
      page: () => const ExerciseRecordView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => ExerciseRecordLogic());
      }),
    ),
    GetPage(
      name: exerciseRecordDetail,
      page: () => const ExerciseRecordDetailView(),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => ExerciseRecordDetailLogic());
      }),
    ),
  ];
}
